<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>

    <script src="../lib/vue2.js"></script>
  </head>
  <body>
    <!-- v-bind指令 动态操作节点属性 -->
    <div id="box">
      <div v-bind:name="which">{{100+20}}</div>
      <!-- 简写成冒号： -->
      <div :name="which">{{which=="red"}}</div>
    </div>

    <script>
      let Item = new Vue({
        el: "#box",
        data: {
          which: "red",
        },
      });
    </script>
  </body>
</html>
